package com.ja.enumall;

/**
 * 枚举必须要有有参构造
 * Created by 11936 on 2019/4/28.
 */

public enum InquiryStatusEnum {
    WEIBAOJIA("已作废",0),YIBAOCUN("已审核",1),YITIJIAO("已提交",2),YISHENHE("以保存",3),YIZUOFEI("未报价",4);

    private String statusName;
    private Integer statusValue;

    public static String getStatusName(Integer statusValue){
        for(InquiryStatusEnum inquiryStatusEnum : InquiryStatusEnum.values()){
            if(inquiryStatusEnum.getStatusValue() == statusValue){
                return inquiryStatusEnum.getStatusName();
            }
        }
        return null;
    }

    InquiryStatusEnum(String statusName, Integer statusValue) {
        this.statusName = statusName;
        this.statusValue = statusValue;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public Integer getStatusValue() {
        return statusValue;
    }

    public void setStatusValue(Integer statusValue) {
        this.statusValue = statusValue;
    }
}
